import turtle
import time


def hart_arc():  # 画圆弧
    for i in range(200):
        turtle.right(1)
        turtle.forward(2)


def move(x, y):  # 改变画笔位置
    turtle.hideturtle()
    turtle.up()
    turtle.goto(x, y)
    turtle.down()
    turtle.showturtle()


def man():
    # 设置画布，画笔颜色，粗细以及速度
    turtle.setup(width=800, height=500)
    turtle.color('red', 'pink')
    turtle.pensize(3)
    turtle.speed(1)
    move(x=0, y=-180)  # 初始画笔坐标
    turtle.left(140)  # 左旋转
    turtle.begin_fill()  # 标记背景填充位置
    turtle.forward(224)  # 向前移动画笔，长度为224
    # 画爱心！
    hart_arc()
    turtle.left(120)
    hart_arc()
    turtle.forward(224)  # 标记背景填充结束位置
    turtle.end_fill()
    # 点击窗口关闭程序
    print('520')
    window = turtle.Screen()
    window.exitonclick()


if __name__ == '__main__':
    man()
